<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Callback</title>
<link href="../../../../../styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="11%"><strong>Package</strong></td>
    <td width="89%">com.jxl.shuriken.events </td>
  </tr>
  <tr>
    <td><strong>Class</strong></td>
    <td>public class Callback </td>
  </tr>
  <tr>
    <td><strong>Inheritance</strong></td>
    <td>Callback &gt; Object </td>
  </tr>
  <tr>
    <td><strong>Subclasses</strong></td>
    <td>&nbsp;</td>
  </tr>
</table>
<p>Callback provides an easy way to register for events in Shuriken. Since there typically isn't enough RAM to support the mx EventDispatcher mechnism, you instead have to provide callbacks; functions that are called when the event happens. This allows another component or parent component to register for an event, and have a function of it's choice called.</p>
<p>More importantly, it reduces the amount of variables a UIComponent based class has to have to support callbacks. Typically, callbacks store the function the other component wants called when the event happens as well as the scope. That means, for every event, you have to store 2 variables. For 4 events, that is 8 variables. While the amount can't be helped, the amount of code the developer has to write can. Callbacks merely hold these 2 variables, thus making 1 event requiring just 1 callback. </p>
<p>view examples</p>
<p>See also</p>
<p>Public Properties</p>
<p>Public Methods</p>
<p>&nbsp;     </p>
</body>
</html>
